﻿namespace Contoso.ActiveDirectory {

    #region Usings
    using System;
    using System.Collections.Concurrent;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks; 
    #endregion

    public class ChildGroupDNSearchCriteria {

        #region Members
        public string GroupDN { get; private set; }
        public string DomainDN { get; private set; }
        public ConcurrentDictionary<string, int> ChildGroupDNs { get; set; }
        public int CurrentRecursionDepth { get; set; }
        public ConcurrentBag<Task> Tasks { get; private set; }
        public CancellationTokenSource CTS { get; set; } 
        #endregion

        #region Constructor
        public ChildGroupDNSearchCriteria(string groupDN, string domainDN, ConcurrentDictionary<string, int> childGroupDNs,
                int groupSearchRecursionDepth, ConcurrentBag<Task> tasks, CancellationTokenSource cts) {
            this.GroupDN = groupDN;
            this.DomainDN = domainDN;
            this.ChildGroupDNs = childGroupDNs;
            this.CurrentRecursionDepth = groupSearchRecursionDepth;
            this.Tasks = tasks;
            this.CTS = cts;

            this.CurrentRecursionDepth++;
        } 
        #endregion
    }
}
